package day13.thread01;


/**
 * @author Xiao
 * @date 2021/8/5
 */
public class ThreadDemo05 {
    /**
     * 获取线程对象
     *      public static Thread currentThread()：返回对当前正在执行的线程对象的引用
     */
    public static void main(String[] args) {
        String name = Thread.currentThread().getName();
        System.out.println(name);   //main
        MyRunnable02 mr = new MyRunnable02();
        Thread t = new Thread(mr);
        t.start();
    }
}
